package com.feituan.manager.controller;


import com.feituan.core.persistence.service.IOrderService;
import com.feituan.core.persistence.service.IUserService;
import com.feituan.core.pojo.entity.Order;
import com.feituan.core.pojo.entity.User;
import com.feituan.core.pojo.request.CommonPageReq;
import com.feituan.core.pojo.request.OrderPageReq;
import com.feituan.core.pojo.response.Response;
import com.feituan.core.pojo.response.page.PageData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaohu
 * @since 2024-05-09
 */
@RestController
@RequestMapping("/order")
@Api(tags = "订单管理")
public class OrderController extends BaseController{
    @Autowired
    private IOrderService iOrderService;

    @PostMapping("/list_page")
    @ApiOperation("")
    public Response<PageData<Order>> listPage(@Valid OrderPageReq request) {
        setDefaultPageParameters(request);
        return Response.success(iOrderService.queryPage(request));
    }

}
